// 这是购物车发送请求获取数据的函数
import myAxios from '@/utils/myAxios';

//请求购物车数据
export const reqCartList = () => {
    return myAxios.get('/api/cart/cartList')
}

// 切换商品状态
export const reqCheCart = (skuId,isChecked) => {
    return myAxios.get(`/api/cart/checkCart/${skuId}/${isChecked}`)
}

// 全选
export const reqBatchCheck = (isChecked,skuIdList) => {
    return myAxios.post(`/api/cart/batchCheckCart/${isChecked}`,skuIdList)
}
// 删除某一个商品数据
export const reqDelOneGoods = (skuId) => {
    return myAxios.delete(`/api/cart/deleteCart/${skuId}`)
}


// 删除选中的商品数据
export const reqBatchDelGoods = (ids)=>{
    return myAxios.post('/api/cart/batchDeleteCart',ids)
}